<!DOCTYPE html>
<html>
 {{{ html.header(out) }}}
<body>

{{{ html.navbar(out,"/web/timers") }}}
  
<div class="container overflow-hidden">
  <div class="row gy-5"> <h4>Timers</h4> </div>
  <div class="row"><div class="col">
   {{{ out("Current time:%s",html.milliStr(EM.clock())) }}}
  </div></div>

  <hr>
  
{{{
  local devs,ts = EM.Devices,{}
  for id,info in pairs(devs) do
    for t,_ in pairs(info.timers or {}) do
      ts[#ts+1]=t
    end
  end
  table.sort(ts,function(a,b) return a.time < b.time end)
  for _,t in ipairs(ts) do
    out('<div class="row">')
    out([[<div class="col">QA:%s</div><div class="col">ID:%s</div><div class="col">%s</div><div class="col">%s</div><div class="col">%s</div>]],
         t.ctx.name,t.ctx.id,html.milliStr(t.time),t.descr,t.tag or "")
    out('</div>')
  end
}}}
</table>
 </div>
</div>

{{{ html.footer(out) }}}
</body>
</html>